﻿using System;
using System.Collections.Generic;
using HAVNet.Core.String;


namespace HAVNet.Intros.AST
{
    public class ASTAttributeGroups : List<ASTAttributeGroup>
    {
        public override string ToString ()
        {
            return Strings.joinobjs (Environment.NewLine, this);
        }
    }

    public class ASTAttributeGroup : ASTNode
    {
        public string ident { get; set; }
        public readonly List<ASTAttribute> attributes = new List<ASTAttribute>();

        public override string ToString ()
        {
            if (ident != null)
                return "[" + ident + " : " + Strings.joinobjs(", ", attributes) + "]";
            else
                return "[" + Strings.joinobjs(", ", attributes) + "]"; 
        }
    }
}
